﻿using System.Collections.Generic;
using System.Threading.Tasks;
using Abp.AspNetCore.Mvc.Authorization;
using Abp.IO.Extensions;
using Abp.UI;
using Abp.Web.Models;
using Microsoft.AspNetCore.Mvc;
using ARchGL.Platform.DemoUiComponents.Dto;
using ARchGL.Platform.Storage;
using Abp.Authorization;
namespace ARchGL.Platform.Web.Controllers
{
    [AbpAllowAnonymous]
    public class ErrorController : PlatformControllerBase
    {
        public ErrorController()
        {
        }
        //[HttpPost("Error404")]
        //[Route("error/404")]
        public IActionResult Error404()
        {
            return Json(new AjaxResponse(new ErrorInfo("访问内容不存在,请检查后再试")));
        }
        //[HttpPost("Error")]
        //[Route("error/{code:int}")]
        public IActionResult Error(int code)
        {
            // handle different codes or just return the default error view
            return Json(new AjaxResponse(new ErrorInfo("访问出错,错误码：" + code.ToString())));
        }
    }
}